package com.briup;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.util.Map;
//查询一个班级的所有学生
public class GetClassAndStuById {
  public static void main(String[] args) {
      SqlSessionFactory sqlSessionFactory = SqlSessionFactoryUtils.getSqlSessionFactory();
      SqlSession sqlSession = sqlSessionFactory.openSession();
      ClassMapper mapper = sqlSession.getMapper(ClassMapper.class);
      Clazz calzzAndStuById = mapper.getCalzzAndStuById(1);
    System.out.println(calzzAndStuById);
    System.out.println();
    sqlSession.close();
  }
}
